 package com.gmrz.uaf.protocol.v1.validaton;
 
 import com.gmrz.uaf.protocol.v1.processor.exception.UAFErrorCode;
 import com.gmrz.uaf.protocol.v1.schema.Version;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
 public class VersionValidator
   implements Validator<Version>
 {
   private static final Logger LOG = LogManager.getLogger(VersionValidator.class);
 
   public void validate(Version v) throws HeaderValidationException
   {
     Version currentVersion = new Version();
     if (currentVersion.compareTo(v) != 0) {
       LOG.error("UAF Protocol version[" + v + "] is not equal to the supported version[" + currentVersion + "]");
       throw new HeaderValidationException(UAFErrorCode.PROTOCOL_VERSION_NOT_SUPPORTED);
     }
   }
 }
